package com.example.recuitactivity.Builder;

import android.util.Log;

import com.example.recuitactivity.Builder.RecruitInfoAbstractBuilder;
import com.example.recuitactivity.bean.RecuitInfo;

public class RecruitInfoDirector {
    private RecruitInfoAbstractBuilder builder;
    public RecruitInfoDirector(RecruitInfoAbstractBuilder builder){
        this.builder=builder;
    }

    public RecuitInfo construct(long id,String recuitName, String enterpriseName, String salary, String eduRequest, String location, String detail, String scale){
        if(builder.isNeedId()){
            builder.buildItemId(id);
        }
        builder.buildUsername(recuitName);
        builder.buildCompany(enterpriseName);
        builder.buildSalary(salary);
        builder.buildEduBackground(eduRequest);
        builder.buildLocation(location);
        builder.buildDetail(detail);
        builder.buildScale(scale);
        builder.buildUpdateTime();
        return builder.getResult();
    }

}
